package tp.pr5;

import java.util.ArrayList;

public class Observable<E> {
	
	protected ArrayList<E> _observer=new ArrayList<E>();		
	
	public Observable ()
	{
		//this._observer=new ArrayList<E>();		
	}
	
	public void addObserver(E obs)
	{
			
		if (!this._observer.contains(obs))
			this._observer.add(obs);
	}
	
	public void removeObserver(E maruja)
	{
		int i = 0;
		
		while (this._observer.get(i) != maruja) i++;
		
		this._observer.remove(i);
	}

}
